package com.example.mark.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mark.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Update("update user SET username = #{username}, password = #{password} WHERE user_id =#{userId}")
    boolean UpdateByUserId(User user);

    @Delete("DELETE FROM user WHERE user_id = #{id}")
    boolean DeleteByUserId(int id);
}
